package STUDENT.NGUYENSANG.OOPs.EX2_TamGiac;
import java.util.Scanner;
public class Views {
	public static void main(String[] argns)
	{
		int side1=0, side2=0, side3=0;
		Canh C=new Canh();
		ConTroller CT=new ConTroller();
		Scanner input=new Scanner(System.in);
		System.out.println("Nhap gai tri cac canh");
		side1 =input.nextInt();
		side2 =input.nextInt();
		side3 =input.nextInt();
		C.setSide1(side1);
		C.setSide2(side2);
		C.setSide3(side3);
		while(!CT.Check(C)){
			System.out.println("Ban nhap khong dung");
			break;
		}
		if(CT.Check(C)){
			int caser=0;
			System.out.println("0. Tinh chu vi 1.Tinh dien tich");
			caser=input.nextInt();
			switch(caser)
			{
			case 0:
				System.out.println("Chu vi la:"+CT.Perimeter(C));
				break;
			case 1:
				System.out.println("Dien tich la: "+CT.Area(C));
				break;
			}
		}
	}
}
